<?php
/* @var $this GaleriController */
/* @var $dataProvider CActiveDataProvider */
cs()->registerCssFile(bu() . '/plugins/fancybox/jquery.fancybox-1.3.1.css');
cs()->registerScriptFile(bu() . '/plugins/fancybox/jquery.mousewheel-3.0.2.pack.js', CClientScript::POS_BEGIN);
cs()->registerScriptFile(bu() . '/plugins/fancybox/jquery.fancybox-1.3.1.pack.js', CClientScript::POS_BEGIN);
$is_indo = lang() == "id";


?>
<script>
    $(document).ready(function () {
        $(".my_video").click(function () {
            $.fancybox({
                'padding':0,
                'autoScale':false,
                'transitionIn':'none',
                'transitionOut':'none',
                'title':this.title,
                'href':this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                'type':'swf',
                'swf':{
                    'wmode':'transparent',
                    'allowfullscreen':'true'
                }
            });
            return false;
        });
        
   
    });
</script>


	<table width="710px" height="500px" border="0px"  cellpadding="2" cellpadding="2" >
      <tr>
      <?php 
$i=0; foreach($models as $model): $i++;?>     
        <td valign="top" style="width:200px;height:140px;padding:2px;" >        
        <a class="my_video pigura" href="http://www.youtube.com/watch?v=<?=$model['v']?>" title="<?=$model['nama_']?>">
		<div><img border="0" src="http://img.youtube.com/vi/<?=$model['v']?>/2.jpg" width="200px" height="140px"  /></div>
         <div class="judul_news" style="width:200px;" ><?=$model['nama_']?></div></a>                            
		</td>
        <? if (($i % 3) == 0) { ?>  </tr><tr> <?}?>
         <? if ($i == $count ) { ?>  </tr><?}?>
  <?php endforeach; ?>
  </table>
   <div style="position:relative;" align="center">
        <?php $this->widget('CLinkPager', array(
        'pages' => $pages,
    )) ?>
    </div>

    